Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move FdTable to a common location and split off Unix behavior #4045

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CraftSpider
Copy link
Contributor

I'm open to instead keeping all the functions on the base trait, but this seemed like an easy way to keep them clearly only intended to be used in the unix shims.

Preparation for Windows FS support, see #4043

@cgettys-microsoft
Copy link
Contributor

@sivadeilra - here's one of the PRs related to adding Miri support for Windows FS APIs, RE: #3482

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is anything in this file different from what used to be in fd.rs? If yes, please split this up in multiple commits -- one that just moves code without changing it, and one that changes it. As-is, it is nearly impossible to review this since I'd have to manually compare your new code with the current code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll double check and split it if there's any difference.

@RalfJung
Copy link
Member

I'm open to instead keeping all the functions on the base trait, but this seemed like an easy way to keep them clearly only intended to be used in the unix shims.

What are you referring to here?

}

/// Represents unix-specific file descriptions.
pub trait UnixFileDescription: FileDescription {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that only half the trait moved up to the shared part -- is that worth it? You mentioned elsewhere that read and write are also not ideal for Windows. What kinds of changes did you have in mind to their signature?

I am not convinced yet that having a shared base trait for Unix FDs and Windows handles is a good idea.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My comment on the other PR noted that I may have been wrong about the signature not being good for Windows. I'm going to try something and confirm.

Separately, your first sentence of this comment is what I was referring to by 'keeping all the functions on the base trait' - I'm not sure if it's worth it to split the trait, or to keep it all as one. I just did it this way because it was relatively simple, but I have no strong opinions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants